package java8Up.lambda;

/**
 * @author Fang Ruichuan
 * @date 2022-12-23 14:30
 */
public class MyEventConsumerDemo {
    public static void main(String[] args) {
        MyEventConsumer consumer = new MyEventConsumer() {
            private int eventCount = 0;
            @Override
            public void consume(Object event) {
                System.out.println(event.toString() + " consumed " + this.eventCount++ + " times.");
            }
        };
    }
}
